<script type="text/javascript" src="<?php echo $this->webroot;?>js/jquery.lightbox-0.5.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo $this->webroot;?>css/jquery.lightbox-0.5.css" media="screen">
<script type="text/javascript">
    $(function() {
        $('#gallery-photo a').lightBox({
		overlayBgColor: '#444',
		overlayOpacity: 0.6,
		imageLoading: '<?php echo $this->webroot;?>img/lightbox-ico-loading.gif',
		imageBtnClose: '<?php echo $this->webroot;?>img/close.png',
		imageBtnPrev: '<?php echo $this->webroot;?>img/lightbox-btn-prev.gif',
		imageBtnNext: '<?php echo $this->webroot;?>img/lightbox-btn-next.gif',
		imageBlank: '<?php echo $this->webroot;?>img/lightbox-btn-next.gif',
		containerResizeSpeed: 350,
		txtImage: 'Image',
		txtOf: 'of'
	   });
    });
    </script>
   <style type="text/css">
	/* jQuery lightBox plugin - Gallery style */
	#gallery-photo {
 		padding-left:0px;
		padding-right:1px;
		padding-bottom:15px;
		width: 602px;
		float:left;
		z-index:1000;
	}
	#gallery-photo ul { list-style: none; }
	#gallery-photo ul li { display: inline;
 	}
	#gallery-photo ul img {
		border: 0px solid #fff;
		border-width: 0px; padding-right:1px;
		padding-bottom:11px;
		width:190px;
 	}
	#gallery-photo ul a:hover img {
		border: 0px solid #3e3e3e;
		border-width: 0px;
		color: #fff;
		width:190px;
	}
	#gallery-photo ul a:hover { color: #fff; }
	</style>

<div id="content">
  <h3 class="widgettitle"><span><?php echo $this->Html->link('Trang chủ',array('controller'=>'news','action'=>'home'));?> » Thư viện ảnh
 </span></h3>
 <div id="content-detail">
 <h2 class="tilte"><?php echo $galley['Gallery']['name']?></h2>
 	 <div id="gallery-photo" align="center">
     <table border="0" cellpadding="0" cellspacing="0" width="100%">
         <tr>
            <?php
           		$i=0;
                foreach($images as $item){
               	$i++;
            ?>
            <td width="190" align='center'>
                <div style="width: 185px; height: 149px; border: 1px #CCCCCC solid; padding:2px;text-align:center;">
                <a href="<?php echo $this->webroot;?>files/uploads/gallery/<?php echo $item['Img']['url'];?>">
				 <?php 
				 if(is_file('files/uploads/gallery/'.$item['Img']['url'])){
				 ?>
                 <img src="<?php echo $this->webroot;?>files/uploads/gallery/<?php echo $item['Img']['url']; ?>" width="185" height="149">
                 <?php }else{?>
                 <img src="<?php echo $this->webroot;?>img/no-image.jpg" width="185" height="149">
                 <?php } ?>
                 </a>
                 </div>
                <div style="margin: 10px 5px 10px 8px;" align="left">
                <?php echo $item['Img']['note']; ?>
                </div>
            </td>
             <?php if($i%3==0){?>
            </tr><tr>
            <?php }}?>
        </tr>
     </table>
     </div>
      <?php if($i==0){echo 'Không tìm thấy hình ảnh nào!';}?>
    
    <h2 class="title" style="border-bottom:#CCC 1px dotted;"><span>Thông tin khác</span></h2>
		<div style='padding: 10px 0;display: block'>
		<?php foreach($others_galley as $k => $v):?>
		<div class='other-view-news'>
		   <?php echo $this->Html->link($v,array('controller'=>'galleries','action'=>'view',$k),array('class'=>'link_12_black'));?>
		</div>
			<?php endforeach;?>
		<div class='clr'></div>
	</div>
     <div class="clr"></div>
    </div>
</div>

<?php echo $this->element('news-right');?>